<%@page import="com.kaishengit.entity.Prod"%>
<%@page import="com.kaishengit.dao.ProdDao"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	request.setCharacterEncoding("UTF-8");
	String id = request.getParameter("id");
	String name = request.getParameter("name");
	String price = request.getParameter("price");
	
	ProdDao prodDao =new ProdDao();
	Prod prod = new Prod();
	
	prod.setId(Integer.parseInt(id));
	prod.setProdName(name);
	prod.setPrice(Float.parseFloat(price));
	
	prodDao.update(prod);
	
	response.sendRedirect("home.jsp");
	
%>
